home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / DockExtenders / Launch / Source / Launch.nib (.txt) < prev    next >
NeXT TypedStream Data  |  1994-01-05  |  11KB  |  225 lines

  1. typedstream
  2. StreamTable
  3.     HashTable
  4. Object
  5. [20c]
  6. typedstream
  7. [767c]
  8. typedstream
  9.     HashTable
  10. Object
  11. HeaderClass
  12. %%%%i@@
  13. genericobject_nib
  14. executeItem
  15. prefsPanel
  16. onautoSwitch
  17. logoutSwitch
  18. openItem
  19. openLogin:
  20. openLogout:
  21. executeLogout:
  22. executeLogin:
  23. okPrefs:
  24. showPrefs:
  25. testLogout:
  26. FirstResponder
  27. firstnib
  28. checkSpelling:
  29. alignSelCenter:
  30.     unscript:
  31. pasteFont:
  32. runPageLayout:
  33. superscript:
  34. copyRuler:
  35.     copyFont:
  36. selectAll:
  37. pasteRuler:
  38. toggleRuler:
  39. showGuessPanel:
  40. alignSelLeft:
  41. paste:
  42. performClose:
  43. arrangeInFront:
  44. subscript:
  45. copy:
  46. alignSelRight:
  47. delete:
  48. orderFrontColorPanel:
  49. underline:
  50. performMiniaturize:
  51. [10524c]
  52. typedstream
  53.     HashTable
  54. Object
  55. NibData
  56. @@@@s
  57. Storage
  58. {*@@}
  59.     [47{*@@}]
  60. File's Owner
  61. CustomObject
  62. Application
  63. MainMenu
  64. MenuTemplate
  65. *@*@ccc
  66. Launch
  67. Matrix
  68. Control
  69.     Responder
  70. @:@iiii
  71. MenuCell
  72. ButtonCell
  73. ActionCell
  74.     Helvetica
  75. Info Panel...
  76. Help...
  77. Preferences...
  78. ff@@#::s
  79. submenuAction:
  80. Bitmap
  81.     menuArrow
  82. Scripts
  83. Execute Login Script
  84. Execute Logout Script
  85. Open Login Script
  86. Open Logout Script
  87. Example Login Script
  88. Example Logout Script
  89. Select All
  90. Services
  91. MenuItem
  92. WindowTemplate
  93. iiii***@s@
  94. Panel
  95.     TextField
  96. TextFieldCell
  97. Version 1.3, January 1994
  98. by S. Fitzpatrick, Q.U.B.
  99. Button
  100. NXImage
  101. :Copyright 1994, S.Fitzpatrick & QUB.  All Rights Reserved.
  102. !An application for auto-launching
  103. Button1
  104. Field1
  105. Field2
  106. VersionNumber
  107. Field
  108. Field3$
  109. MainInstance
  110. Preferences
  111. Execute ~/.Launch and quit
  112. NXradio
  113. NXradioH
  114. Execute ~/.Launch and stay
  115. 'Ask whether or not to execute ~/.Launch
  116. Set up interface as normal
  117. Radio
  118. Action on being auto-launched
  119. Execute ~/.Logout
  120. 'Ask whether or not to execute ~/.Logout
  121. Logout as normal
  122. Logout action
  123. Q2bUQ
  124. Panel1
  125. ScrollView
  126. ClipView
  127. ciifffcfffs
  128. [2394c]{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
  129. \margl40
  130. \margr40
  131. {\colortbl\red0\green0\blue0;}
  132. \pard\tx560\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b\i0\ul0\fs24 Launch
  133. \b0  is an application that allows you to initialize and clean up your workspace when you log in/out: when Launch is auto-launched, it executes the script ~/.Launch; when you logout, Launch executes the script ~/.Logout. \
  134. Actually, you can set Launch's auto-launch/logout behaviour in the preferences panel; I think the options are self-explanatory. Note that if Launch is started from the Workspace (i.e. it isn't auto-launched) it will set up it's interface like any normal application. Also, quitting Launch (using the Quit menu item) does not activate the logout hook.\
  135. Launch can be used to, for example:\
  136.     launch applications that you would usually startup when you log in (but that you don't need to have in the dock);\
  137.     place an image in the background when you log in;\
  138.     play a login/logout sound.\
  139. See the example scripts.\
  140. I'm not really sure if there is a need for Launch now with the various dock-extenders, but it's free so you can't complain. This particular version was inspired by someone asking for a means to set up a user definable logout hook.\
  141. To install Launch:\
  142.     place Launch in the dock;\
  143.     set it to auto-launch using the Workspace Manager's preference panel;\
  144.     create the scripts ~/.Launch and ~/.Logout;\
  145.     ensure the scripts are executable and begin with the line\
  146.         #!/bin/csh\
  147.     (I assume any shell could be used, but I haven't tried that).\
  148. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320 There are menu items to open the scripts in Edit and to execute the scripts (e.g. for testing).\
  149. Launch is free: further distribution is permitted on a non-profit basis. 
  150. \fc0 All the usual disclaimers apply: this application is provided in good faith and in the hope that it will be useful, but absolutely no guarantee is given as to its suitability or otherwise for any purpose; under no cicumstance will I or the Queen's University of Belfast be held responsible for anything resulting from the use of or the inability to use this application, the source code, or any part thereof.\
  151. Share and Enjoy.\
  152. \qc Stephen Fitzpatrick\
  153. Department of Computer Science\
  154. The Queen's University of Belfast\
  155. sfitzp@cs.qub.ac.uk (NeXT mail)
  156. NXCursor
  157. NXibeam
  158. Scroller
  159. _doScroller:
  160. @@@ffs
  161. ScrollingTextsm
  162. Panel2
  163. [1998c]{\rtf0\ansi{\fonttbl\f1\fmodern Courier;\f0\fswiss Helvetica;}
  164. \margl40
  165. \margr40
  166. {\colortbl\red0\green0\blue0;}
  167. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f1\b0\i0\ul0\fs24\fc0 #!/bin/csh\
  168. echo Logging in > /dev/console\
  169. # Play a sound\
  170. sndplay /LocalLibrary/Sounds/login.snd\
  171. # Start some applications\
  172. open /LocalApps/Console\
  173. # 4 performance monitors, one each for CPU, disk, memory and network\
  174. /LocalApps/KPerfMon.app/KPerfMon -InfoType 0  &\
  175. /LocalApps/KPerfMon.app/KPerfMon -InfoType 1  &\
  176. /LocalApps/KPerfMon.app/KPerfMon -InfoType 2  &\
  177. /LocalApps/KPerfMon.app/KPerfMon -InfoType 3  &\
  178. # Check most recent logins before this login\
  179. echo Last 10 logins > /dev/console\
  180. last -10 | sed -e '1,/console/d' | head -5 > /dev/console\
  181. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc0 \
  182. # Display an image. A more useful variant would select a random image\
  183. # from a list.\
  184. Alert "Background Image?" Yes No\
  185. if ($status == 0) background /LocalLibrary/Backgrounds/Leather.tiff\
  186. \f0 \
  187. Some notes:\
  188.     The open command can be used to launch applications. One advantage of using open is that you don't have to specify a full pathname; the Workspace will search its normal applications path for the applicaton.\
  189.     If the application is part of a package (i.e. a .app file), then, on a 2.1 system, you should open the executable within the package (e.g. Foo.app/Foo). I don't think this is necessary under 3.0.\
  190.     You can't pass arguments to an application using open. You can Launch an application using its pathname and set defaults using the standard NeXT method (see the KPerfMon example).\
  191.     The Console and KPerfMon applications and the backgound and Alert commands are NOT supplied with Launch; they should be available from your usual software source. (I believe they're all free.) (And don't ask where you can get Leather.tiff!)\
  192.     The sndplay command comes with Motorola NeXTs; I don't know if it comes with Intel NeXTs.
  193. Panel3
  194. [624c]{\rtf0\ansi{\fonttbl\f1\fmodern Courier;\f0\fswiss Helvetica;}
  195. \margl40
  196. \margr40
  197. {\colortbl\red0\green0\blue0;}
  198. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f1\b0\i0\ul0\fs24\fc0 #!/bin/csh\
  199. echo Logging out > /dev/console\
  200. # Play a sound\
  201. sndplay /LocalLibrary/Sounds/logout.snd\
  202. # Remove the background image\
  203. set p = (`ps auxww | grep background | grep -v grep | awk '\{print $2\}'`)\
  204. if ("$p" != "") kill -HUP $p\
  205. # This process is left behind by the Console application\
  206. set p = (`ps uxww | grep /usr/ucb/tail | grep -v grep | awk '\{print $2\}'`)\
  207. if ("$p" != "") kill -KILL $p\
  208. {i*@@@}
  209. [18{i*@@@}]
  210. hide:
  211. terminate:
  212. delegate
  213. makeKeyAndOrderFront:
  214. okPrefs:N/
  215. showPrefs:
  216. onautoSwitch/<
  217. prefsPanel/2
  218. copy:
  219. selectAll:
  220. logoutSwitch/U
  221. executeLogin:
  222. executeLogout:
  223. openLogin:
  224. openLogout:
  225.